/**
* <b>Description:</b><br> 
* @author Reading.Reagan</a>
* @version 1.0
* @Note
* <b>ProjectName:</b> resallocation
* <br><b>PackageName:</b> com.jingyanzi.resallocation.client
* <br><b>ClassName:</b> package-info
* <br><b>Date:</b> 2018年9月29日 下午3:32:04
*/
package com.jingyanzi.resallocation.client;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.jingyanzi.resallocation.result.ResultSupport;
import com.jingyanzi.resallocation.domain.AreaDO;
import com.jingyanzi.resallocation.result.ResultDO;
import com.jingyanzi.resallocation.service.IAreaService;

@RestController
@RequestMapping("/api")
public class RegionClientImpl implements RegionClientAPI {
	
	@Autowired
	private IAreaService areaService;

	@Override
	@RequestMapping("/region/{id}")
	public AreaDO get(@PathVariable(value = "id") Integer id) {
		ResultDO result = areaService.get(id);
		return (AreaDO) result.getModel(ResultSupport.FIRST_MODEL_KEY);
	}

	@Override
	public List<AreaDO> query() {
		// TODO Auto-generated method stub
		return null;
	}
	
}